#[doc = "Register `data_output` reader"]
pub struct R(crate::R<DATA_OUTPUT_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<DATA_OUTPUT_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<DATA_OUTPUT_SPEC>> for R {
    fn from(reader: crate::R<DATA_OUTPUT_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `data_output` writer"]
pub struct W(crate::W<DATA_OUTPUT_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<DATA_OUTPUT_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl core::convert::From<crate::W<DATA_OUTPUT_SPEC>> for W {
    fn from(writer: crate::W<DATA_OUTPUT_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Fields `gpio(0-15)` reader - "]
pub struct GPIO_R(crate::FieldReader<bool, bool>);
impl GPIO_R {
    pub(crate) fn new(bits: bool) -> Self {
        GPIO_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for GPIO_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Fields `gpio(0-15)` writer - "]
pub struct GPIO_W<'a> {
    w: &'a mut W,
    offset: usize,
}
impl<'a> GPIO_W<'a> {
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits =
            (self.w.bits & !(0x01 << self.offset)) | (((value as u32) & 0x01) << self.offset);
        self.w
    }
}
impl R {
    #[doc = ""]
    #[inline(always)]
    pub unsafe fn gpio(&self, n: usize) -> GPIO_R {
        GPIO_R::new(((self.bits >> n) & 0x01) != 0)
    }
    #[doc = "Bit 0"]
    #[inline(always)]
    pub fn gpio0(&self) -> GPIO_R {
        GPIO_R::new((self.bits & 0x01) != 0)
    }
    #[doc = "Bit 1"]
    #[inline(always)]
    pub fn gpio1(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2"]
    #[inline(always)]
    pub fn gpio2(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3"]
    #[inline(always)]
    pub fn gpio3(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 4"]
    #[inline(always)]
    pub fn gpio4(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 4) & 0x01) != 0)
    }
    #[doc = "Bit 5"]
    #[inline(always)]
    pub fn gpio5(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 5) & 0x01) != 0)
    }
    #[doc = "Bit 6"]
    #[inline(always)]
    pub fn gpio6(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 6) & 0x01) != 0)
    }
    #[doc = "Bit 7"]
    #[inline(always)]
    pub fn gpio7(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 7) & 0x01) != 0)
    }
    #[doc = "Bit 8"]
    #[inline(always)]
    pub fn gpio8(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 8) & 0x01) != 0)
    }
    #[doc = "Bit 9"]
    #[inline(always)]
    pub fn gpio9(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 9) & 0x01) != 0)
    }
    #[doc = "Bit 10"]
    #[inline(always)]
    pub fn gpio10(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 10) & 0x01) != 0)
    }
    #[doc = "Bit 11"]
    #[inline(always)]
    pub fn gpio11(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 11) & 0x01) != 0)
    }
    #[doc = "Bit 12"]
    #[inline(always)]
    pub fn gpio12(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 12) & 0x01) != 0)
    }
    #[doc = "Bit 13"]
    #[inline(always)]
    pub fn gpio13(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 13) & 0x01) != 0)
    }
    #[doc = "Bit 14"]
    #[inline(always)]
    pub fn gpio14(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 14) & 0x01) != 0)
    }
    #[doc = "Bit 15"]
    #[inline(always)]
    pub fn gpio15(&self) -> GPIO_R {
        GPIO_R::new(((self.bits >> 15) & 0x01) != 0)
    }
}
impl W {
    #[doc = ""]
    #[inline(always)]
    pub unsafe fn gpio(&mut self, n: usize) -> GPIO_W {
        GPIO_W { w: self, offset: n }
    }
    #[doc = "Bit 0"]
    #[inline(always)]
    pub fn gpio0(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 0 }
    }
    #[doc = "Bit 1"]
    #[inline(always)]
    pub fn gpio1(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 1 }
    }
    #[doc = "Bit 2"]
    #[inline(always)]
    pub fn gpio2(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 2 }
    }
    #[doc = "Bit 3"]
    #[inline(always)]
    pub fn gpio3(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 3 }
    }
    #[doc = "Bit 4"]
    #[inline(always)]
    pub fn gpio4(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 4 }
    }
    #[doc = "Bit 5"]
    #[inline(always)]
    pub fn gpio5(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 5 }
    }
    #[doc = "Bit 6"]
    #[inline(always)]
    pub fn gpio6(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 6 }
    }
    #[doc = "Bit 7"]
    #[inline(always)]
    pub fn gpio7(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 7 }
    }
    #[doc = "Bit 8"]
    #[inline(always)]
    pub fn gpio8(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 8 }
    }
    #[doc = "Bit 9"]
    #[inline(always)]
    pub fn gpio9(&mut self) -> GPIO_W {
        GPIO_W { w: self, offset: 9 }
    }
    #[doc = "Bit 10"]
    #[inline(always)]
    pub fn gpio10(&mut self) -> GPIO_W {
        GPIO_W {
            w: self,
            offset: 10,
        }
    }
    #[doc = "Bit 11"]
    #[inline(always)]
    pub fn gpio11(&mut self) -> GPIO_W {
        GPIO_W {
            w: self,
            offset: 11,
        }
    }
    #[doc = "Bit 12"]
    #[inline(always)]
    pub fn gpio12(&mut self) -> GPIO_W {
        GPIO_W {
            w: self,
            offset: 12,
        }
    }
    #[doc = "Bit 13"]
    #[inline(always)]
    pub fn gpio13(&mut self) -> GPIO_W {
        GPIO_W {
            w: self,
            offset: 13,
        }
    }
    #[doc = "Bit 14"]
    #[inline(always)]
    pub fn gpio14(&mut self) -> GPIO_W {
        GPIO_W {
            w: self,
            offset: 14,
        }
    }
    #[doc = "Bit 15"]
    #[inline(always)]
    pub fn gpio15(&mut self) -> GPIO_W {
        GPIO_W {
            w: self,
            offset: 15,
        }
    }
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Port data output register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data_output](index.html) module"]
pub struct DATA_OUTPUT_SPEC;
impl crate::RegisterSpec for DATA_OUTPUT_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [data_output::R](R) reader structure"]
impl crate::Readable for DATA_OUTPUT_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [data_output::W](W) writer structure"]
impl crate::Writable for DATA_OUTPUT_SPEC {
    type Writer = W;
}
